/*
 * Features.h
 *
 *  Created on: Jan 4, 2014
 *      Author: thanhkm
 */

#ifndef FEATURES_H_
#define FEATURES_H_

#include <iostream>
#include <opencv2/opencv.hpp>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/nonfree/features2d.hpp"
#include "opencv2/nonfree/nonfree.hpp"

#include "IO.h"

class Features {
public:
	Features();
	virtual ~Features();

	/*
	 * Compute keypoints and descriptors of all images
	 */
	void compute(const std::vector<cv::Mat> &images);
	void computeKeypoints(const std::vector<cv::Mat> &images);
	/*
	 * return the number of Keypoints
	 */
	int numberKeypoints();

	/*
	 * return a vector of keypoints for all images
	 */
	std::vector<std::vector<cv::KeyPoint>> getKeypoints();

	/*
	 * return a vector of keypoints for all images
	 */
	std::vector<cv::Mat> getDescritpors();

	/*
	 * set hessian threshold
	 */
	void setHessianThreshold(int thresh);

private:
	std::vector<std::vector<cv::KeyPoint>> allKeypoints;
	std::vector<cv::Mat> allDescriptors;
	int hessianThreshold;
};

#endif /* FEATURES_H_ */
